
import 'package:json_annotation/json_annotation.dart';
part 'MyApp10Model.g.dart';

/*
 * 数据模型
 * https://www.cnblogs.com/ly570/p/11167537.html
 */
//标志class需要实现json序列化功能
@JsonSerializable()
class MyApp10Model extends Object {
  final int userId;
  final int id;
  final String title;
  final String body;

  /* 构造函数 */
  MyApp10Model(this.userId,this.id,this.title,this.body);

  factory MyApp10Model.fromJson(Map<String, dynamic> json) => _$MyApp10ModelFromJson(json);

  Map<String,dynamic> toJson() => _$MyApp10ModelToJson(this);

}